<%@ page language="java" import="java.util.*,com.mag.domain.*" pageEncoding="UTF-8" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <script type="text/javascript">
        window.onpageshow = function (event) {
            if (event.persisted) {
                window.location.reload();
            }
        };
    </script>

    <title>供应商管理</title>
    <style>
        .center {
            margin: 1%;
            text-align: center;
        }

        #mainT {
            width: 100%;
            text-align: center;
            font-size: 16px;
            line-height: 26px;
            border: 2px solid #6e6e6e;
        }

        #mainT caption {
            text-align: center;
            font-size: 30px;
            font-weight: bolder;
        }

        #mainT th {
            text-align: center;
            font-size: 20px;
            font-weight: bolder;
            line-height: 36px;
            border: 1px solid #6e6e6e;
        }

        #mainT td {
            width: 100px;
            border: 1px solid #6e6e6e;
            font-size: 18px;
        }


        .column-layout-container {
            width: 100%;
            padding: 10px;
            background-color: #D9ECF6;
        }

        .column-layout {
            width: 25%;
            height: 90px;
            margin: 10px;
            background-color: green;
        }

        .column-layout-container {
            overflow: hidden;
        }

        .column-layout {
            float: left;
        }

        .column-left {
            width: 50%;
            height: 60px;
            margin: auto;
            text-align: center;
            background-color: #D9ECF6;
            display: inline-block;
        }

        .column-right {
            width: 50%;
            height: 30px;
            margin: 15px;
            text-align: center;
            background-color: #D9ECF6;
            display: inline-block;
            overflow: auto;
            vertical-align: middle;
        }
    </style>
    <SCRIPT language="javascript" type="text/javascript" src="/manage/js/SearchSupplier.js"></SCRIPT>
</head>
<body onload="load()" style="background-color: #D9ECF6;">
<form name="form2" id="form2" action="" method="post">
    <div class="center">
        <img src="/manager/img/logo.jpg" style="position: absolute; top: 0; right: 0; width: 160px; height: 160px;">
        <div class="column-layout-container">
            <div class="column-left"><h1>供应商管理</h1></div>
            <div class="column-right"><input type="button" align="left" style="width:70px;height:30px ; font-size:20px;"
                                             value="返回" onclick="window.location.href='/manager/index.jsp'"/>
                <input type="hidden" id="vhidden" value="<%= request.getSession().getAttribute("ison") %>"/>
            </div>
        </div>
        <div class="center">
            <table id="mainT" cellpadding="0" cellspacing="0">
                <tr>
                    <th>供货商ID</th>
                    <th>名称</th>
                    <th>通信地址</th>
                    <th>网址</th>
                    <th>公司电话</th>
                    <th>公司传真</th>
                    <th>公务邮箱</th>
                    <th>联系人</th>
                    <th>联系人电话</th>
                    <th>关系建立时间</th>
                    <th>供应物品</th>
                    <th>首次供货时间</th>
                    <th>累计供货次数</th>
                    <th>累计供货量</th>
                    <th>累计次品数</th>
                    <th>延期交货次数</th>
                    <th>累计交易额</th>
                    <th>良品率</th>
                    <th>准时交货率</th>
                    <th></th>
                    <th></th>
                    <th></th>
                </tr>
                <%
                    ArrayList<Suppliers> al = new ArrayList<Suppliers>();
                    al = (ArrayList<Suppliers>) request.getSession().getAttribute("SupplierList");
                    for (Suppliers supplier : al) {
                %>
                <tr>
                    <td><%=supplier.getSupplierID() %>
                    </td>
                    <td><%=supplier.getSupplierName()%>
                    </td>
                    <td><%=supplier.getSupplierAddress() %>
                    </td>
                    <td><%=supplier.getWebSite() %>
                    </td>
                    <td><%=supplier.getSupplierPhone()%>
                    </td>
                    <td><%=supplier.getFaxSupplier() %>
                    </td>
                    <td><%=supplier.getOfficialEmail() %>
                    </td>
                    <td><%=supplier.getPersonContact()%>
                    </td>
                    <td><%=supplier.getPhoneContact() %>
                    </td>
                    <td><%=supplier.getDateBulid() %>
                    </td>
                    <td><%=supplier.getGoodsSupply() %>
                    </td>
                    <td><%=supplier.getDateFirstSupply() %>
                    </td>
                    <td><%=supplier.getAccumulativeTime() %>
                    </td>
                    <td><%=supplier.getAccumulativeLevel() %>
                    </td>
                    <td><%=supplier.getNumFault() %>
                    </td>
                    <td><%=supplier.getNumBacklogging() %>
                    </td>
                    <td><%=supplier.getTotalMoney() %>
                    </td>
                    <td><%=supplier.getNoFaultRate() %>
                    </td>
                    <td><%=supplier.getDeliveryOnTime() %>
                    </td>
                    <td><a href="/manager/Suppliersu?type=goDetail&supplierid=<%=supplier.getSupplierID() %>">详情</a>
                    </td>
                    <td><a href="/manager/Suppliersu?type=goUpdate&supplierid=<%=supplier.getSupplierID() %>">修改</a>
                    </td>
                    <td><a href="/manager/Suppliersu?type=delete&supplierid=<%=supplier.getSupplierID() %>">删除</a>
                    </td>
                </tr>
                <% } %>
            </table>
        </div>
    </div>
</form>
</body>
</html>